/*
 *  engine.h
 */

#ifndef ENGINE_H
#define ENGINE_H

#include "../../common/src/message.h"
#include "../../common/src/message_queue.h"
#include "../../common/src/runnable.h"
#include "../../common/src/synchro_vector.h"
#include "game_info.h"

// Cross reference class forward declaration
class ClientApp;

class Engine : public Runnable {
public:
    Engine(ClientApp* app);
    ~Engine();
    void run();
    void processMessages();
private:
    ClientApp* app;
    void updateGameList(Message* msg);
    void processResponseGameCreateOk(Message* msg);
    void processResponseGameAbortOk(Message* msg);
    void processResponseGameStartOk(Message* msg);
    void processResponseGameJoinOk(Message* msg);
    void processResponsePlayerJoined(Message* msg);
    void processResponsePlayerDissevered(Message* msg);
    //void printGameList();   //testing function
};

#endif  //ENGINE_H

//{+}

